<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="initial-scale=1.0, user-scalable=no, width=device-width">
<title>机动车档案详情</title>
<link rel="stylesheet" type="text/css" href="${ctx}/easyui/themes/default/easyui.css">
<link rel="stylesheet" type="text/css" href="${ctx}/easyui/easyui_my.css">
<link rel="stylesheet" type="text/css" href="${ctx}/easyui/themes/icon.css">
<link rel="stylesheet" type="text/css" href="${ctx}/css/css.css" />

<script type="text/javascript" src="${ctx}/js/jquery-1.7.min.js"></script>
<script type="text/javascript" src="${ctx}/easyui/jquery.easyui.min.js"></script>
<script type="text/javascript" src="${ctx}/easyui/locale/easyui-lang-zh_CN.js"></script>
<script type="text/javascript" src="${ctx}/js/common.js"></script>
</head>
<script type="text/javascript"> 
var jsonstr="[]";  
var jsonarray = eval('('+jsonstr+')'); 
$(function(){
	var TypeListArea = "";
	//循环列表,加载第一个档案类型所有图片
	<c:forEach items="${listTpurl}" var="obj" varStatus="status">
    var htmlPicArea = "";
	if("${obj.id}"=='1'){
	var Ocxid="playOcx"+${status.count};
	htmlPicArea +="<input type=\"checkbox\" checked=\"checked\" name=\"PrintFlag\" value=\""+${status.count}+"\" style=\"display:none;\">"; 
	htmlPicArea +="<object id=\""+Ocxid+"\" classid=\"clsid:BCB28301-A827-4DE4-BA67-623FAC960893\" width=\"100%\" height=\"99%\"></object>";
	$("#TableDatatp2").append(htmlPicArea);
	document.getElementById(Ocxid).ImageUrl = "${obj.singleIpaddress}";
	//document.getElementById(Ocxid).WaterImage();
	}
	
	//生成json数组
	var formdata = {  
            "id" : "fileNameType"+"${obj.id}",  
            "singleIpaddress" : "${obj.singleIpaddress}"
        };
    jsonarray.push(formdata);
	</c:forEach>
	
	
     <c:forEach items="${tpNums}" var="mapObj" varStatus="status">
		//alert("${status.count}"+"==="+"${mapObj.key}");
     if("${ info.ywlx}" =='A'){
   	     if("${mapObj.key}"=='1'){
 		 	$("#fileNameType1"+"${mapObj.key}").text('申请表['+"${mapObj.value}"+'张]');
 		}else if("${mapObj.key}"=='2'){
 			$("#fileNameType1"+"${mapObj.key}").text('身份证明['+"${mapObj.value}"+'张]');
 		}else if("${mapObj.key}"=='3'){
 			$("#fileNameType1"+"${mapObj.key}").text('来历凭证['+"${mapObj.value}"+'张]');
 		}else if("${mapObj.key}"=='4'){
 			$("#fileNameType1"+"${mapObj.key}").text('查验记录表['+"${mapObj.value}"+'张]');
 		}else if("${mapObj.key}"=='5'){
 			$("#fileNameType1"+"${mapObj.key}").text('合格证['+"${mapObj.value}"+'张]');
 		}else if("${mapObj.key}"=='6'){
 			$("#fileNameType1"+"${mapObj.key}").text('交强险['+"${mapObj.value}"+'张]');
 		}else if("${mapObj.key}"=='7'){
 			$("#fileNameType1"+"${mapObj.key}").text('购置税['+"${mapObj.value}"+'张]');
 		}else if("${mapObj.key}"=='8'){
 			$("#fileNameType1"+"${mapObj.key}").text('抵押权人证明['+"${mapObj.value}"+'张]');
 		}else if("${mapObj.key}"=='9'){
 			$("#fileNameType1"+"${mapObj.key}").text('登记证书['+"${mapObj.value}"+'张]');
 		}else if("${mapObj.key}"=='10'){
 			$("#fileNameType1"+"${mapObj.key}").text('合同['+"${mapObj.value}"+'张]');
 		}else if("${mapObj.key}"=='0'){
 			$("#fileNameType0"+"${mapObj.key}").text('其他['+"${mapObj.value}"+'张]');
 		}else if("${mapObj.key}"=='100'){
 			$("#fileNameType"+"${mapObj.key}").text('全部['+"${mapObj.value}"+'张]');
    	}
     }else if("${ info.ywlx}" =='B'){
   	    if("${mapObj.key}"=='1'){
  		 	$("#fileNameType1"+"${mapObj.key}").text('申请表['+"${mapObj.value}"+'张]');
  		}else if("${mapObj.key}"=='2'){
  			$("#fileNameType1"+"${mapObj.key}").text('身份证明['+"${mapObj.value}"+'张]');
  		}else if("${mapObj.key}"=='3'){
  			$("#fileNameType1"+"${mapObj.key}").text('交易发票['+"${mapObj.value}"+'张]');
  		}else if("${mapObj.key}"=='4'){
  			$("#fileNameType1"+"${mapObj.key}").text('查验记录表['+"${mapObj.value}"+'张]');
  		}else if("${mapObj.key}"=='5'){
  			$("#fileNameType1"+"${mapObj.key}").text('来历凭证['+"${mapObj.value}"+'张]');
  		}else if("${mapObj.key}"=='0'){
  			$("#fileNameType0"+"${mapObj.key}").text('其他['+"${mapObj.value}"+'张]');
  		}else if("${mapObj.key}"=='100'){  	    	 
  			$("#fileNameType"+"${mapObj.key}").text('全部['+"${mapObj.value}"+'张]');
     	} 
      }else if("${ info.ywlx}" =='D' || "${ info.ywlx}" =='K' || "${ info.ywlx}" =='L'){
   	      if("${mapObj.key}"=='1'){
    		 	$("#fileNameType1"+"${mapObj.key}").text('申请表['+"${mapObj.value}"+'张]');
    		}else if("${mapObj.key}"=='3'){
    			$("#fileNameType1"+"${mapObj.key}").text('身份证明['+"${mapObj.value}"+'张]');
    		}else if("${mapObj.key}"=='2'){
    			$("#fileNameType1"+"${mapObj.key}").text('变更证明['+"${mapObj.value}"+'张]');
    		}else if("${mapObj.key}"=='4'){
    			$("#fileNameType1"+"${mapObj.key}").text('查验记录表['+"${mapObj.value}"+'张]');
    		}else if("${mapObj.key}"=='0'){
    			$("#fileNameType0"+"${mapObj.key}").text('其他['+"${mapObj.value}"+'张]');
    		}else if("${mapObj.key}"=='100'){
    			$("#fileNameType"+"${mapObj.key}").text('全部['+"${mapObj.value}"+'张]');
       	} 
      }else if("${ info.ywlx}" =='E'){
    	     if("${mapObj.key}"=='1'){
    	 		 	$("#fileNameType1"+"${mapObj.key}").text('申请表['+"${mapObj.value}"+'张]');
    	 		}else if("${mapObj.key}"=='2'){
    	 			$("#fileNameType1"+"${mapObj.key}").text('登记证书['+"${mapObj.value}"+'张]');
    	 		}else if("${mapObj.key}"=='3'){
    	 			$("#fileNameType1"+"${mapObj.key}").text('身份证明['+"${mapObj.value}"+'张]');
    	 		}else if("${mapObj.key}"=='4'){
    	 			$("#fileNameType1"+"${mapObj.key}").text('合同['+"${mapObj.value}"+'张]');
    	 		}else if("${mapObj.key}"=='5'){
    	 			$("#fileNameType1"+"${mapObj.key}").text('解除抵押申请['+"${mapObj.value}"+'张]');
    	 		}else if("${mapObj.key}"=='6'){
    	 			$("#fileNameType1"+"${mapObj.key}").text('结清证明['+"${mapObj.value}"+'张]');
    	 		}else if("${mapObj.key}"=='0'){
    	 			$("#fileNameType0"+"${mapObj.key}").text('其他['+"${mapObj.value}"+'张]');
    	 		}else if("${mapObj.key}"=='100'){
    	 			$("#fileNameType"+"${mapObj.key}").text('全部['+"${mapObj.value}"+'张]');
    	    	}
      }else if("${ info.ywlx}" =='G'){
 	     if("${mapObj.key}"=='1'){
	 		 	$("#fileNameType1"+"${mapObj.key}").text('申请表['+"${mapObj.value}"+'张]');
	 		}else if("${mapObj.key}"=='2'){
	 			$("#fileNameType1"+"${mapObj.key}").text('回收证明['+"${mapObj.value}"+'张]');
	 		}else if("${mapObj.key}"=='3'){
	 			$("#fileNameType1"+"${mapObj.key}").text('查验记录表['+"${mapObj.value}"+'张]');
	 		}else if("${mapObj.key}"=='0'){
	 			$("#fileNameType0"+"${mapObj.key}").text('其他['+"${mapObj.value}"+'张]');
	 		}else if("${mapObj.key}"=='100'){
	 			$("#fileNameType"+"${mapObj.key}").text('全部['+"${mapObj.value}"+'张]');
	    	}
		}else if("${ info.ywlx}" =='I'){
	 	     if("${mapObj.key}"=='1'){
		 		 	$("#fileNameType1"+"${mapObj.key}").text('申请表['+"${mapObj.value}"+'张]');
		 		}else if("${mapObj.key}"=='2'){
		 			$("#fileNameType1"+"${mapObj.key}").text('身份证明['+"${mapObj.value}"+'张]');
		 		}else if("${mapObj.key}"=='4'){
		 			$("#fileNameType1"+"${mapObj.key}").text('原始档案信息['+"${mapObj.value}"+'张]');
		 		}else if("${mapObj.key}"=='3'){
		 			$("#fileNameType1"+"${mapObj.key}").text('查验记录表['+"${mapObj.value}"+'张]');
		 		}else if("${mapObj.key}"=='0'){
		 			$("#fileNameType0"+"${mapObj.key}").text('其他['+"${mapObj.value}"+'张]');
		 		}else if("${mapObj.key}"=='100'){
		 			$("#fileNameType"+"${mapObj.key}").text('全部['+"${mapObj.value}"+'张]');
		    	}
		}else if("${ info.ywlx}" =='S'){
	 	     if("${mapObj.key}"=='1'){
		 		 	$("#fileNameType1"+"${mapObj.key}").text('资料清单['+"${mapObj.value}"+'张]');
		 		}else if("${mapObj.key}"=='2'){
		 			$("#fileNameType1"+"${mapObj.key}").text('受理凭证['+"${mapObj.value}"+'张]');
		 		}else if("${mapObj.key}"=='0'){
		 			$("#fileNameType0"+"${mapObj.key}").text('其他['+"${mapObj.value}"+'张]');
		 		}else if("${mapObj.key}"=='100'){
		 			$("#fileNameType"+"${mapObj.key}").text('全部['+"${mapObj.value}"+'张]');
		    	}
			}

	</c:forEach>
		
});


function a_click(o){
	$(".anniuyanshid li").removeClass("hoveraddclass");
	$("#"+o).addClass("hoveraddclass");
	showPic(o);
	//checkStaFunc(o);
}
function checkStaFunc(id) {
	//var obj=$("#"+id).previousSbiling;
	var obj=document.getElementById(id);
	$('input[name=PrintFlag]').each(function () {
    //if ($(this).val() == $(obj).val()){
    	if ($(this).val() == id){
	   if($(this).prop("checked")){
			$(this).prop("checked", false);
	   }else{
			$(this).prop("checked", true);
	   }
	}
    else{
       $(this).prop("checked", false);
    }
 });
}
//根据文件类型id显示相应的档案图片
function showPic2(id){
	$("#TableDatatp2").empty();
	for(var i=0;i<jsonarray.length;i++){	
		if(jsonarray[i].id==id){
			var str =id.substr(id.length-1,1);
			var Ocxid="playOcx"+str;
			htmlPicArea="";
			//htmlPicArea +="<div>";
			htmlPicArea +="<input type=\"checkbox\"  name=\"PrintFlag\" value=\""+id+"\" style=\"display:none;\">";
			htmlPicArea +="<object id=\""+Ocxid+"\" classid=\"clsid:BCB28301-A827-4DE4-BA67-623FAC960893\" width=\"100%\" height=\"99%\"></object>";
			//htmlPicArea +="</div>";
			$("#TableDatatp2").append(htmlPicArea);
			//document.getElementById(Ocxid).BindImage(url, 1);
			document.getElementById(Ocxid).ImageUrl = jsonarray[i].singleIpaddress;
			//document.getElementById(Ocxid).WaterImage();
			/* tbody="";
			tbody += "<div><img src=\""+jsonarray[i].singleIpaddress+"\" width=\"70%\" height=\"50%\"/></div>";
			$("#TableDatatp2").append(tbody); */
		}else if(id=="fileNameType100"){
			var Ocxid="playOcx"+i;
			htmlPicArea="";
			//htmlPicArea +="<div>";
			htmlPicArea +="<object id=\""+Ocxid+"\" classid=\"clsid:BCB28301-A827-4DE4-BA67-623FAC960893\" width=\"100%\" height=\"99%\"></object>";
			//htmlPicArea +="</div>";
			$("#TableDatatp2").append(htmlPicArea);
			document.getElementById(Ocxid).ImageUrl = jsonarray[i].singleIpaddress;
		}
		
	}
}
//根据文件类型id显示相应的档案图片
function showPic(id){
	$("#TableDatatp2").empty();
	for(var i=0;i<jsonarray.length;i++){
		if(jsonarray[i].id==id){
			//var str =id.substr(id.length-1,1);
			var Ocxid="playOcx"+i;
			htmlPicArea="";
			htmlPicArea +="<input type=\"checkbox\"  name=\"PrintFlag\" value=\""+i+"\" checked=\"checked\" style=\"display:none;\">";
			htmlPicArea +="<object id=\""+Ocxid+"\" classid=\"clsid:BCB28301-A827-4DE4-BA67-623FAC960893\" width=\"100%\" height=\"99%\"></object>";
			$("#TableDatatp2").append(htmlPicArea);
			//document.getElementById(Ocxid).BindImage(url, 1);
			document.getElementById(Ocxid).ImageUrl = jsonarray[i].singleIpaddress;
			//document.getElementById(Ocxid).WaterImage();
			/* tbody="";
			tbody += "<div><img src=\""+jsonarray[i].singleIpaddress+"\" width=\"70%\" height=\"50%\"/></div>";
			$("#TableDatatp2").append(tbody); */
		}else if(id=="fileNameType000"){
			var Ocxid="playOcx"+i;
			htmlPicArea="";
			htmlPicArea +="<input type=\"checkbox\"  name=\"PrintFlag\" value=\""+i+"\" checked=\"checked\" style=\"display:none;\">";
			htmlPicArea +="<object id=\""+Ocxid+"\" classid=\"clsid:BCB28301-A827-4DE4-BA67-623FAC960893\" width=\"100%\" height=\"99%\"></object>";
			$("#TableDatatp2").append(htmlPicArea);
			document.getElementById(Ocxid).ImageUrl = jsonarray[i].singleIpaddress;
		}
		
	}
}
</script>
<body class="easyui-layout">
	<div data-options="region:'east',border:false" id="TableDatatp1" style="width:300px; background:#f0f0f0;border-left: 1px solid #d2d2d2;">
	<div style="margin: 10px 9px 0;">
	<table cellspacing="0" cellpadding="0" border="0" width="100%" class="dananguanglikuang100">	     
				<tr>
		             <th align="right" height="28" width="100" class="xinjyangshilaiddf1">流水号：</th>
		             <td class="xinjyangshilaiddf1">
		                 <a id="lsh">${info.lsh }</a>
		             </td>
		         </tr>
		     	 <tr>
		             <th align="right" height="28" class="xinjyangshilaiddf2">号牌号码：</th>
		             <td class="xinjyangshilaiddf2">
		                <a id="hphmmc">${info.hphmmc }</a>
		             </td>
		         </tr>
		         <tr>
		             <th align="right" height="28" class="xinjyangshilaiddf1">车辆品牌：</th>
		             <td class="xinjyangshilaiddf1">
		                 <a id="clpp1">${info.clpp1 }</a>
		             </td>
		         </tr>
		         <tr>
		             <th align="right" height="28" class="xinjyangshilaiddf2">号牌种类：</th>
		             <td class="xinjyangshilaiddf2">
		                 <a id="hpzl">${info.hpzlmc }</a>
		             </td>
		             </tr>
		     	 <%-- <tr>
		             <th align="right" height="28" class="xinjyangshilaiddf1">车辆颜色：</th>
		             <td class="xinjyangshilaiddf1">
		                 <a id="csys">${info.csysmc }</a>
		             </td>
		         </tr> --%>
		         <tr>
		              <th align="right" height="28" class="xinjyangshilaiddf2">车辆识别编号：</th>
		             <td class="xinjyangshilaiddf2">
		           	     <a id="clsbdh">${info.clsbdh }</a>
		             </td>
		         </tr>
		         <%-- <tr>
		             <th align="right" height="28" class="xinjyangshilaiddf1">发动机编号：</th>
		             <td class="xinjyangshilaiddf1">
		                <a id="fdjh">${info.fdjh }</a>
		             </td>
		         </tr> --%>
		         <tr>
		             <th align="right" height="28" class="xinjyangshilaiddf1">业务类型：</th>
		             <td class="xinjyangshilaiddf1">
		                <a id="ywmc">${info.ywmc }</a>
		             </td>
		         </tr>
		         <tr>
		             <th align="right" height="28" class="xinjyangshilaiddf2">所有人：</th>
		             <td class="xinjyangshilaiddf2">
		                 <a id="syr">${info.syr }</a>
		             </td>
		         </tr>
		    </table>
		    <div style="height: 60px; padding: 0 65px 0 0;">
		    	 <a href="#" operaType="1" id="print" style=" float: right;margin:12px;" class="sousuocx">打印</a>
                 <a href="#" operaType="2" id="download" style=" float: right;margin:12px;" class="sousuocx">下载</a>
                 <input type="hidden" id="currentXh" value="${info.xh}"/>
                 <input type="hidden" id="currentLsh" value="${info.lsh}"/>
                 <input type="hidden" id="currentHpzl" value="${info.hpzl}"/>
         </div>
		    </div>		
		    
		    
	<div class="anniujiheti">  
		<ul class="anniuyanshid">
		<%-- <c:forEach items="${tpNums}" var="mapObj" varStatus="status">	 --%>
			<c:choose>
				<c:when test="${ info.ywlx =='A' }">
						<li onClick="a_click(this.id)" id="fileNameType1" class="hoveraddclass" title="业务申请表"><a href="#fileNameType11" id="fileNameType11">申请表</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType2" title="所有人身份证明"><a href="#fileNameType21" id="fileNameType12">身份证明</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType3" title="机动车来历凭证"><a href="#fileNameType31" id="fileNameType13">来历凭证</a></li>
						<li onClick="a_click(this.id)" id="fileNameType4" title="机动车查验记录表"><a href="#fileNameType41" id="fileNameType14">查验记录表</a></li>
						<li onClick="a_click(this.id)" id="fileNameType5" title="合格证或进口说明书"><a href="#fileNameType51" id="fileNameType15">合格证或进口说明书</a></li>
						<li onClick="a_click(this.id)" id="fileNameType6" title="机动车交强险凭证"><a href="#fileNameType61" id="fileNameType16">交强险</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType7" title="免税证明或完税证明"><a href="#fileNameType71" id="fileNameType17">购置税</a></li>
						<li onClick="a_click(this.id)" id="fileNameType8" title="抵押权人身份证明"><a href="#fileNameType81" id="fileNameType18">抵押权人身份证明</a></li>
						<li onClick="a_click(this.id)" id="fileNameType9" title="登记证书(第一页和签注页复印件)"><a href="#fileNameType91" id="fileNameType19">登记证书</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType10" title="合同(采集首页和签字或加盖公正复印件)"><a href="#fileNameType101" id="fileNameType110">合同</a></li>
						<li onClick="a_click(this.id)" id="fileNameType0"><a href="#fileNameType00" id="fileNameType00">其他</a></li>
						<li onClick="a_click(this.id)" id="fileNameType000"><a href="#fileNameType08" id="fileNameType100">全部</a></li>
				</c:when>
				<c:when test="${ info.ywlx =='B' }">
						<li onClick="a_click(this.id)" id="fileNameType1" class="hoveraddclass" title="业务申请表"><a href="#fileNameType11" id="fileNameType11">申请表</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType2" title="身份证正反面、加盖公章的组织机构代码证、委托书"><a href="#fileNameType21" id="fileNameType12">身份证明</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType3" title="二手车交易发票"><a href="#fileNameType31" id="fileNameType13">交易发票</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType4" title="机动车查验记录表"><a href="#fileNameType41" id="fileNameType14">查验记录表</a></li>
						<li onClick="a_click(this.id)" id="fileNameType5" title="来历凭证"><a href="#fileNameType51" id="fileNameType15">来历凭证</a></li>
						<li onClick="a_click(this.id)" id="fileNameType0"><a href="#fileNameType00" id="fileNameType00">其他</a></li>
						<li onClick="a_click(this.id)" id="fileNameType000"><a href="#fileNameType08" id="fileNameType100">全部</a></li>
				</c:when>
				<c:when test="${ info.ywlx =='D' || info.ywlx =='K' || info.ywlx =='L' }">
						<li onClick="a_click(this.id)" id="fileNameType1" class="hoveraddclass" title="业务申请表"><a href="#fileNameType11" id="fileNameType11">申请表</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType2" title="身份证正反面、加盖公章的组织机构代码证、委托书"><a href="#fileNameType21" id="fileNameType12">身份证明</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType3" title="变更证明资料"><a href="#fileNameType31" id="fileNameType13">变更证明</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType4" title="机动车查验记录表"><a href="#fileNameType41" id="fileNameType14">查验记录表</a></li>
						<li onClick="a_click(this.id)" id="fileNameType0"><a href="#fileNameType00" id="fileNameType00">其他</a></li>
						<li onClick="a_click(this.id)" id="fileNameType000"><a href="#fileNameType08" id="fileNameType100">全部</a></li>
				</c:when>
				<c:when test="${ info.ywlx =='E' }">
						<li onClick="a_click(this.id)" id="fileNameType1" class="hoveraddclass" title="抵押登记采集《机动车抵押登记/质押备案申请表》"><a href="#fileNameType11" id="fileNameType11">申请表</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType2" title="机动车所有人和抵押权人身份证明"><a href="#fileNameType21" id="fileNameType12">身份证明</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType3" title="登记证书(第一页和签注页复印件)"><a href="#fileNameType31" id="fileNameType13">登记证书</a></li>						
						<li onClick="a_click(this.id)" id="fileNameType4" title="合同(采集首页和签字或加盖公正复印件)"><a href="#fileNameType41" id="fileNameType14">合同</a></li>
						<li onClick="a_click(this.id)" id="fileNameType5" title="解除抵押岗采集申请表"><a href="#fileNameType51" id="fileNameType15">解除抵押申请</a></li>
						<li onClick="a_click(this.id)" id="fileNameType6" title="贷款结清证明"><a href="#fileNameType61" id="fileNameType16">结清证明</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType0"><a href="#fileNameType00" id="fileNameType00">其他</a></li>
						<li onClick="a_click(this.id)" id="fileNameType000"><a href="#fileNameType08" id="fileNameType100">全部</a></li>
				</c:when>
				<c:when test="${ info.ywlx =='G' }">
						<li onClick="a_click(this.id)" id="fileNameType1" class="hoveraddclass" title="业务申请表"><a href="#fileNameType11" id="fileNameType11">申请表</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType2" title="商务部门报废回收证明"><a href="#fileNameType21" id="fileNameType12">回收证明</a></li>
						<li onClick="a_click(this.id)" id="fileNameType3" title="查验记录表(监销车辆)"><a href="#fileNameType31" id="fileNameType13">查验记录表</a></li>
						<li onClick="a_click(this.id)" id="fileNameType0"><a href="#fileNameType00" id="fileNameType00">其他</a></li>
						<li onClick="a_click(this.id)" id="fileNameType000"><a href="#fileNameType08" id="fileNameType100">全部</a></li>
				</c:when>
				<c:when test="${ info.ywlx =='I' }">
						<li onClick="a_click(this.id)" id="fileNameType1" class="hoveraddclass" title="业务申请表"><a href="#fileNameType11" id="fileNameType11">申请表</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType2" title="身份证正反面"><a href="#fileNameType21" id="fileNameType12">身份证明</a></li>	
						<li onClick="a_click(this.id)" id="fileNameType3" title="查验记录表"><a href="#fileNameType31" id="fileNameType13">查验记录表</a></li>						
						<li onClick="a_click(this.id)" id="fileNameType4" title="原始纸质档案资料(初次登记信息、车辆相关技术参数变更登记信息、最近一次车辆登记信息"><a href="#fileNameType41" id="fileNameType14">原始档案信息</a></li>
						<li onClick="a_click(this.id)" id="fileNameType0"><a href="#fileNameType00" id="fileNameType00">其他</a></li>
						<li onClick="a_click(this.id)" id="fileNameType000"><a href="#fileNameType08" id="fileNameType100">全部</a></li>
				</c:when>
				<c:when test="${ info.ywlx =='S' }">
						<li onClick="a_click(this.id)" id="fileNameType1" class="hoveraddclass" title="资料清单"><a href="#fileNameType11" id="fileNameType11"></a></li>	
						<li onClick="a_click(this.id)" id="fileNameType2" title="受理凭证"><a href="#fileNameType21" id="fileNameType12"></a></li>	
						<li onClick="a_click(this.id)" id="fileNameType0"><a href="#fileNameType00" id="fileNameType00">其他</a></li>
						<li onClick="a_click(this.id)" id="fileNameType000"><a href="#fileNameType08" id="fileNameType100">全部</a></li>
				</c:when>
			<%-- 	<c:otherwise>
				</c:otherwise> --%>
			</c:choose>
		<%-- </c:forEach>	 --%>
		</ul>
		<dl class="fangdasuoxiaodan">
			<dd><a href="javascript:OperationPic(1)" id="tubiaos1" title="放大"></a></dd>
			<dd><a href="javascript:OperationPic(2)" id="tubiaos2" title="缩小"></a></dd>
			<dd><a href="javascript:OperationPic(3)" id="tubiaos3" title="左旋转"></a></dd>
			<dd><a href="javascript:OperationPic(4)" id="tubiaos4" title="右旋转"></a></dd>
		</dl>		
	</div>      
	</div>
	<div data-options="region:'center',border:false" id="TableDatatp2">	
	</div>
</body>

<script type="text/javascript">

function OperationPic(type){
	$('input[name=PrintFlag]').each(function () {   
		   if($(this).prop("checked")){
			 var str =$(this).val();
			 var playOcxId = "playOcx"+str.substr(str.length-1,1);
			 if(type=="1"){
				 document.getElementById(playOcxId).ZoomIn(); 
			 }else if(type=="2"){
				 document.getElementById(playOcxId).ZoomOut(); 
			 }else if(type=="3"){
		   		 document.getElementById(playOcxId).RotateImage(0);
			 }else if(type=="4"){
		   		 document.getElementById(playOcxId).RotateImage(1);
			 }
		   }
      });
}
$(function(){
	$('#del,#download,#print').hide();
	//加载权限
	$.ajax({
		type:'POST',
        url:'${ctx}/audit/queryAuditInfo.htm',
        data:{
        	//hphm:$.trim($('#hphmmc').text()),
        	//hpzl:$.trim($('#currentHpzl').val()),
        	lsh:$.trim($('#lsh').text()),
        	xh:$.trim($('#currentXh').val())
        },
        dataType:'json',
        success:function(data, textStatus, jqXHR){
        	if(null!=data && undefined!=data){
        		var applyNo01='';
                var applyNo02='';
        		$.each(data,function(i,info){
        			var permissionType=info.permissionType;//权限类型  03 删除权限 02 下载权限 01 打印权限
        			if(permissionType=='01'){
        				$('#print').show();
        				applyNo01=info.applyNo;
        			}
        			if(permissionType=='02'){
                        $('#download').show();
                        applyNo02=info.applyNo;
        			}
        		});
                $('#print,#download').unbind('click').bind('click',function(){
                	$.ajax({
                    	type:'POST',
                        url:'${ctx}/yxxxgl/countPrintNum.htm',
                        data:{
                        	applyNo:applyNo01
                        },
                        dataType:'json',
                        success:function(data, textStatus, jqXHR){
                        	debugger;
                        	//统计打印次数，在后台进行，前台不需要进行任何提示
                        	
                        }
                    }); 
                    var operaType=$(this).attr('operaType');
                    if(operaType=='1'){
                    	$('input[name=PrintFlag]').each(function () {                			
                   		   if($(this).prop("checked")){
                   			 var str =$(this).val();
                   			 var playOcxId = "playOcx"+str.substr(str.length-1,1)
                   		     document.getElementById(playOcxId).PrintImage();
                   		   }
                         });
                    }else if(operaType=='2'){

                        if(confirm('确认下载图片?')){
                             var lsh=$("#currentLsh").val();
                             var xh=$("#currentXh").val();
                            //window.location.href='${ctx}/yxxxgl/downloadSinglePic.htm?ids='+Ids;
                            window.location.href="${ctx}/yxxxgl/downloadSinglePic.htm?lsh="+lsh+"&xh="+xh+"&applyNo="+applyNo02;

						}
                    }
                });
        	}
        }
	});
})

</script>